package fun.chutianshu;

import fun.chutianshu.entity.Character;
import fun.chutianshu.entity.Map;
import fun.chutianshu.entity.Monster;
import fun.chutianshu.entity.Player;

import java.util.ArrayList;

public class Main {
    public static ArrayList<Map> maps;
    public static Player player;

    public static void main(String[] args) {

        init();

        // 看看地图信息

        for (Map m:maps) {
            System.out.println(m.getInfo());
        }


    }

    //初始化游戏
    // 初始化地图....
    // 初始化人物...
    // 初始化技能...
    // 初始化怪物...
    public static void init(){

        // write your code here
        //初始化人物；
        player = initPlayer();
        // 初始化怪物

        Character m1 = initMonster();

        maps = initMap();

    }

    // 初始化人物
    public static Player initPlayer(){
       return new Player("乔峰",10,1000);
    }

    // 初始化怪物
    public static Monster initMonster(){
        return new Monster("裘千尺",5,50);
    }

    // 初始化地图
    // 初始化人物
    public static ArrayList<Map> initMap(){

        System.out.println("初始化地图开始........");

        Map m1 = new Map("天竺","只见天上万道佛光，飞天仙女吹奏着无上仙音，各种瑞兽灵怪四处游走",0,0);
        Map m2 = new Map("北冥冰国","放眼处万里冰封，寒风呼啸，鹅毛大雪随风飞舞",1,0);
        Map m3 = new Map("花果山","苍天巨树林立，奇花异果密布，到处都有猴子窜来窜去",2,0);
        Map m4 = new Map("火焰山","满目赤红的世界，空气都在热力下扭曲，远处大山上还冒起冲天大火",0,1);
        Map m5 = new Map("东土大唐","街道宽敞整洁，店铺鳞次栉比，车马如龙，行人似海",1,1);
        Map m6 = new Map("龙宫","整个如水晶世界，各种游鱼水怪传游不息，远处一个金碧辉煌的宫殿，上写两个大字：水晶宫！",2,1);
        Map m7 = new Map("盘丝洞","黑色洞口阴风不断，深不见底，四处布满蛛丝，还有无数小蛛爬来爬去",0,2);
        Map m8 = new Map("阎罗殿","绿色鬼火忽明忽暗，无数鬼差阴使肃立两边，正当中坐一青面獠牙身穿朱红官服鬼王，上有匾额：阎罗殿",1,2);
        Map m9 = new Map("蓬莱","岛上密布紫竹，上有仙鸟悠然盘旋，仙音不断，观音大士端坐在一金色莲花当中，宝相庄严",2,2);

        ArrayList<Map> mapArrayList = new ArrayList<>();
        mapArrayList.add(m1);
        mapArrayList.add(m2);
        mapArrayList.add(m3);
        mapArrayList.add(m4);
        mapArrayList.add(m5);
        mapArrayList.add(m6);
        mapArrayList.add(m7);
        mapArrayList.add(m8);
        mapArrayList.add(m9);

        System.out.println("初始化地图结束........");
        return mapArrayList;

    }
}
